public class Demo4 {
    public static void main(String[] args) {
        System.out.println(sumevery(1234));
    }
    public static int sumevery(int n) {
        if(n <= 9) {
            return n;
        }
        int tmp = n % 10 +sumevery(n/10);
        return tmp;
    }
}
